LassoScript Utility
Basics Browse Detail

[Integer->BitFlip]

Tag Link [Integer->BitFlip] Category Math
Type Member Source Available No
Support Preferred Version 5.0
Change Unchanged Data Source Any
Output Type None (Modifies in place) Security None
Implementation LCAPI Sets Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0, Lasso 5.0

Description

[Integer->BitFlip] flips the bit specified in the integer parameter. The bit index should be between 1 and 64.

Syntax

[Integer Variable->(BitFlipBit Index)]

Parameters

Required Parameters
Bit Index The index of the bit to be flipped.

Examples

To flip a bit within an integer value:

Use the [Integer->BitFlip] tag. The following example shows the integer 7 (0111) having its 2nd bit flipped leaving 5 (0101).

[Variable: 'Result'=7]
[($Result)->(BitFlip: 2)]
[Variable: 'Result']

5